﻿<%@ Page Title="" Language="C#" MasterPageFile="~/masterpage_user.master" AutoEventWireup="true" CodeFile="dangmuahang.aspx.cs" Inherits="dangmuahang" %>

<asp:Content ID="Content1" ContentPlaceHolderID="user_content" Runat="Server">
    <div id="giohang">
        <h1>Đang mua hàng</h1>
        <asp:Label ID="message" runat="server" Text=""></asp:Label>
        <table id="box-table-a">
            <tr>
                <th>sản phẩm</th>
                <th>Đơn giá</th>
                <th>Số lượng</th>
                <th>Thành tiền</th>
                <th></th>
            </tr>
            <asp:Repeater ID="parent_repeater" runat="server">
            <ItemTemplate>
            <tr >
                <td colspan="5"><label>Người bán:<%#Eval("tenshop") %></label></td>
            </tr>
            <asp:Repeater ID="child_repeater" runat="server"  datasource='<%# ((System.Data.DataRowView)Container.DataItem).Row.GetChildRows("myrelation") %>'>
            <ItemTemplate>
            <tr>
                    <td><img src='<%# DataBinder.Eval(Container.DataItem, "[\"URL\"]")%>' /><%# DataBinder.Eval(Container.DataItem, "[\"Tensanpham\"]")%><p><asp:HyperLink ID="HyperLink1" CssClass="remove" runat="server" NavigateUrl='<%# "Giohang.aspx?remove=" +DataBinder.Eval(Container.DataItem, "[\"masanpham\"]") %>'>Xóa khỏi giỏ hàng</asp:HyperLink></p></td>
                    <td><%# DataBinder.Eval(Container.DataItem, "[\"giasanpham\"]")%></td>
                    <td><%# DataBinder.Eval(Container.DataItem, "[\"soluong\"]")%></td>
                    <td><%# Convert.ToDouble(DataBinder.Eval(Container.DataItem, "[\"giasanpham\"]")) * Convert.ToInt16(DataBinder.Eval(Container.DataItem, "[\"soluong\"]"))%></td>
                </ItemTemplate>
                </asp:Repeater>
                <td><asp:HyperLink ID="HyperLink2"  CssClass="button" runat="server" NavigateUrl='<%# "quytrinh.aspx?shop=" +Eval("mashop") %>'>Xác nhận mua</asp:HyperLink></td>
            </tr>
            </ItemTemplate>
            </asp:Repeater>
        </table>
    </div>
</asp:Content>

